package us.codecraft.webmagic.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author : xuaoping
 * @Date: 2021/8/19
 */
@Mapper
public interface CrawlUrlDao {

    @Insert("insert into `crawl_url` (`url`) values(#{url})")
    int insert(String url);

    @Select(" select `id` from `crawl_url`" +
            "    where url =#{url}")
    List<Integer> getIds(String url);
}
